﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CinemaSystem
{
    public partial class xwtianjia : Form
    {
        public xwtianjia()
        {
            InitializeComponent();
        }

        private void bttianjia_Click(object sender, EventArgs e)
        {
            string sqlstr = string.Format("insert into Journalism values('{0}','{1}','{2}','{3}')",txtbiao.Text,txtnei.Text,date.Value,txtzhe.Text);
            int i = DBHelper.ExecuteNonQuery(sqlstr);
            if (i > 0)
            {
                MessageBox.Show("添加成功");
            }
            else
            {
                MessageBox.Show("添加失败");
            }
            xwxg xwxg = new xwxg();
            xwxg.Show();
            xwxg.MdiParent = this;
            this.Hide();
        }

        private void xwtianjia_Load(object sender, EventArgs e)
        {

        }

        private void button2_Click(object sender, EventArgs e)
        {

        }
    }
}
